package day240523.StringBulider;

import java.util.Arrays;

public class MyStringBulider {
    char[] value;
    public MyStringBulider(){}
    public MyStringBulider(String string){
        value=string.toCharArray();
    }
    public MyStringBulider append(String string){
        char[] t=string.toCharArray();
        char[] result=new char[t.length+ value.length];
        for (int i = 0; i < value.length ; i++) {
            result[i]=value[i];

        }
        for (int i = 0; i < string.toCharArray().length; i++) {
            result[i+ value.length]=t[i];
        }MyStringBulider myStringBulider=new MyStringBulider();
        myStringBulider.value=result;
        return myStringBulider;
    }public void print(){
        for (int i = 0; i < value.length; i++) {
            System.out.println(value[i]);

        }

    }


}
